package com.fy.tt;

import com.fy.tt.executor.environment.MyMQ;

public class MQTest {
    public static void main(String[] args) throws Exception {
        MyMQ mq = new MyMQ();
        String EXCHANGE_NAME = "item_topic_exchange";//交换机名称，写死
        String queueName = "item_queue";//要监听的队列名称，可以用时间戳+随机数
        mq.channel.queueDeclare(queueName, false, false, false, null);

        String message = "监听型测试消息";
        String binding = "314539853.设备故障";
        mq.channel.basicPublish(EXCHANGE_NAME, binding, null, message.getBytes("UTF-8"));
    }
}
